From b32442cc692c6f32dd0c8d23f7e35a1d40bf8b84 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Tue, 26 Aug 2008 20:52:36 +0000 Subject: [PATCH] hsadnv: Replace invalid waypoint allocation. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@3424 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/hsa_ndv.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gpsbabel/hsa_ndv.c b/gpsbabel/hsa_ndv.c index 527bcba63..1ceb8fd36 100644 --- a/gpsbabel/hsa_ndv.c +++ b/gpsbabel/hsa_ndv.c @@ -86,7 +86,7 @@ hsa_ndv_start(void *data, const XML_Char *xml_el, const XML_Char **attr) } else if (strcmp(el, "Object") == 0) { - wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1); + wpt_tmp = waypt_new(); wpt_tmp->altitude = unknown_alt; in_Object++; } @@ -404,8 +404,7 @@ static void readVersion4(gbfile* pFile) memset(attr, 0, sizeof(attr)); - wpt_tmp = xcalloc(sizeof(*wpt_tmp), 1); - wpt_tmp->altitude = unknown_alt; + wpt_tmp = waypt_new(); // read the first record if( !readRecord( pFile, EF_NVER_REC, recData) ) -- 2.30.2